-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: single-sig IPEX apply, offer, agree #234
feat: single-sig IPEX apply, offer, agree #234
Conversation
* feat: IPEX apply, offer, admit msgs * test: apply, offer, agree integration tests * fix: correct typing * test: ipex unit tests * test: improve test and docs * test: ipex better split of unit tests * test: whitespace diff
m: args.message ?? '', | ||
s: args.schema, | ||
a: args.attributes ?? {}, | ||
i: args.recipient, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure on when i
should be part of the attributes here. It is for grant and not for apply. From what I remember when checking out keripy, it seems to auto add i
if an exn message is created there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iFergal Do you have a link to the lines of code in keripy where this is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look here and it is being done in here as well:
signify-ts/src/keri/app/exchanging.ts
Lines 194 to 214 in ac6dac4
if (recipient !== undefined) { | |
attrs['i'] = recipient; | |
} | |
const a = { | |
...attrs, | |
...payload, | |
}; | |
const _ked = { | |
v: vs, | |
t: ilk, | |
d: '', | |
i: sender, | |
p: p, | |
dt: dt, | |
r: route, | |
q: q, | |
a: a, | |
e: e, | |
}; |
I think this is more explicit, we can amend the interface for the payload parameter in createExchangeMessage
to be something like
interface ExchangeMessageData {
[key: string]: unknown,
/**
* The recipient of the message
*/
i: string
}
that way there is only one way to specify the recipient and we can remove the recipient parameter. This would be more in line with the changes I proposed in #222.
I don't mean to make that change here, but it could be done as a separate PR to tidy up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, though that line of code is never being hit for IPEX since recipient
is always passed as undefined
to createExchangeMessage
. The only other place that createExchangeMessage
is called is from the send
method of exchanges, which also doesn't pass the recipient.
Maybe @pfeairheller can shed more light on when it should be passed as an attribute too (at least for IPEX).
But agree on the interface tidy up, makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lenkan We discussed this in the dev call today, and I also can see you have #252 open that also does this. I've pushed the change for the CICD and compose file only to see if it will pass now. Not sure if additionally all of the other changes you have in draft are required too or not with this new version.
Edit - OK, looks like the tests are indeed broken for the new version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iFergal The changes in aiding.ts
is needed for the upgrade. The other changes were only to highlight what is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lenkan Do you think that PR will merge this week or shall I cherry pick changes to aiding.ts
across?
edit - hitting this now, will try to dig into why when I've more time. (on first call to await grantMultisig
)
HTTP POST /identifiers/GEDA/ipex/grant - 400 Bad Request - {"title": "400 Bad Request", "description": "attempt to send to unknown AID=EJSc85y7RLnwYDU1BGuVKAY8GKde6zvbEFOgkP-aOEBR"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that is the exact same error I reproduced in #252. I created the issue in keria that needs resolution WebOfTrust/keria#230. I have not yet debugged keria for that issue.
It would be good to see if it can be reproduced in plain keripy first I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some other adjustments in my latest push - smids
/rmids
only changed on group creation, not rotation.
There were also some changes in keripy on not using hard coded salts so our tests can't assume the agent AID anymore.
Once WebOfTrust/keria#243 merges, the only failing test is the one you described for vlei issuance. Haven't got a chance to support on that yet.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #234 +/- ##
==========================================
- Coverage 83.51% 82.90% -0.62%
==========================================
Files 46 46
Lines 4210 4246 +36
Branches 1047 1057 +10
==========================================
+ Hits 3516 3520 +4
- Misses 690 721 +31
- Partials 4 5 +1 ☔ View full report in Codecov by Sentry. |
This reverts commit 140ecd7.
To accompany WebOfTrust/keria#198.